<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>试题上传</title>
<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js" ></script>
</head>
<body>
	<hgroup>
		<h1>试题上传</h1>
		<h2>题目类型（单选、包含图片单选）</h2>
	</hgroup>
<form action="{:U(handleUploadExercise)}" method="post" <form action="" method="post" enctype="multipart/form-data">
	<p>题目分类：</p>
	<select name="type">
		<option value="unit1">第一章</option>
		<option value="unit2">第二章</option>
		<option value="unit3">第三章</option>
	</select>
	<p>请上传题目：</p>
	<input id="fileupload" type="file" name="question[]" data-url="{:U(upload)}" multiple="ture" >
	<p>请依次上传答案（例：ABDE）</p>
	<input type="text" id="right_answer" name="right_answer" value="" /><br/><br/>
	<input type="radio" id="existexplain" name="explain" value="existexplain"><lebal>有解析</lebal>
	<input type="radio" id="noexplain" name="explain" checked="checked" value="noexplain"><lebal>无解析</lebal>
	<div id="explain" style="display: none;">
		<p>请依次上传解析（注意：解析顺序与题目顺序一一对应）</p>
		<input id="explainupload" type="file" name="analysis[]" data-url="{:U(upload)}" multiple="ture">
	</div>
	<br/>
	<br/>
	<input type="submit" id="submit" name="submit" value="上传"/>
</form>
<script>
$('#existexplain').click(function(e){
	$('#explain').show();
});
$('#noexplain').click(function(e){
	$('#explain').hide();
	/*========清空选择的文件==================*/
	var obj = document.getElementById('explain') ; 
	obj.outerHTML = obj.outerHTML;
});
</script>
</body> 
</html>